(() => {

    // 定义泛型接口
    interface IBaseCRUD<T> {
        data: Array<T>
        add: (t: T) => T
        getUserId: (id: number) => T
    }

    // 用户类
    class User {
        id?: number
        name: string
        age: number
    }

    // 定义一个类，进行增删改查
    class UserCRUD implements IBaseCRUD<User> {
        data: User[]
        add: (t:

            User
        ) => User
        getUserId: (
            id
                : number) => User


    }
})()